<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <#include "/comm/module-edit.ftl"/>
    <style type="text/css">
        .layui-form-item .layui-input-inline {
            min-width: 230px;
        }

        .layui-form-item .layui-input-block {
            min-width: 230px;
        }

        .layui-form-radio {
            padding-right: 0;
        }
    </style>
</head>

<body>
<div class="layui-div-body">
    <div class="layui-fluid layui-div-edit">
        <form class="layui-form layui-form-pane">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="puName" lay-verify="required"
                               placeholder="请输入姓名" class="layui-input" lay-reqtext="请填写姓名"
                               value="${info.puName!}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">手机号码</label>
                    <div class="layui-input-block">
                        <input type="text" name="puPhone" lay-verify="required|phone"
                               placeholder="请输入手机号码" class="layui-input" value="${info.puPhone!}">
                    </div>
                </div>
            </div>

            <div class="layui-form-item " >
                <div class="layui-inline">
                    <label class="layui-form-label">身份证号</label>
                    <div class="layui-input-block">
                        <input type="text" name="puaIdcard" lay-verify="identity"
                               placeholder="请输入身份证号" class="layui-input" value="${info.puaIdcard!}"
                               lay-reqtext="请输入有效的身份证号码">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">出生年月</label>
                    <div class="layui-input-block">
                        <input type="text" name="puaBirthDate"
                               placeholder="请输入出生年月" class="layui-input form-date" readonly="readonly"
                               value="${info.puaBirthDate!}">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">性别</label>
                    <div class="layui-input-block">
                        <input type="radio" name="puaSex" value="0" title="未知" <#if info.puaSex <=0> checked </#if>>
                        <input type="radio" name="puaSex" value="1" title="男" <#if info.puaSex==1> checked </#if>>
                        <input type="radio" name="puaSex" value="2" title="女" <#if info.puaSex==2> checked </#if>>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">所属角色</label>
                    <div class="layui-input-block">
                        <div id="roleCode" class="xm-select-demo"></div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">联系地址</label>
                <div class="layui-input-block" style="width: 100%;">
                    <textarea name="puaContactAddress" placeholder="请输入联系地址" class="layui-textarea"></textarea>
                </div>
            </div>
            <#--            <div class="layui-form-item">-->
            <#--                <div class="layui-input-block">-->
            <#--                    <div class="layui-footer" style="left: 0;">-->
            <#--                        <button class="layui-btn-b" lay-submit="" lay-filter="save">立即提交-->
            <#--                        </button>-->
            <#--                        <button type="reset" class="layui-btn layui-btn-primary-b">重置</button>-->
            <#--                    </div>-->
            <#--                </div>-->
            <#--            </div>-->
            <div class="layui-form-item">
                <input type="hidden" id="_id" name="_id" value="${info._id}"/>
                <button class="layui-btn" lay-submit="" lay-filter="save">立即提交
                </button>
                <#if info._id ==''>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button></#if>
            </div>
        </form>
    </div>
</div>
<#include "/comm/module-xm-select.ftl"/>
<script>

    layui.use(["edit"], function () {
        let edit = layui.edit;
        edit.render()
        let laydate = layui.laydate;
        // 日期
        laydate.render({
            elem: '.form-date'
        });
        var demoRadio = radioSelectRender({
            el: '#roleCode',
            url: "${request.contextPath}/platform/user/role/jsons",
            name: 'prCode',
            initValue: ['${info.prCode!}'],
            layVerify: 'required',
            layVerType: 'msg'
        });

    });
</script>
</body>

</html>